package com.woniu.adminservice.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebViewConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/data/dataStatistics").setViewName("/data/dataStatistics");
//        registry.addViewController("/data/dataview").setViewName("/data/dataview");
        registry.addViewController("/dataStatistics/newDate").setViewName("/dataStatistics/newDate");
        registry.addViewController("/").setViewName("/login");
        registry.addViewController("/login").setViewName("/login");
        registry.addViewController("/index").setViewName("/index");
        //管理员列表页面
        registry.addViewController("/sys/adminList").setViewName("/sys/adminList");
        //菜单列表页面
        registry.addViewController("/sys/menuList").setViewName("/sys/menuList");
        //添加菜单页面
        registry.addViewController("/sys/addMenu").setViewName("/sys/addMenu");
        //编辑菜单页面
        registry.addViewController("/sys/editMenu").setViewName("/sys/editMenu");
        //角色列表页
        registry.addViewController("/sys/roleList").setViewName("/sys/roleList");
        //添加角色页
        registry.addViewController("/sys/addRole").setViewName("/sys/addRole");
        //编辑角色页
        registry.addViewController("/sys/editRole").setViewName("/sys/editRole");
    }
}
